package com.dsjy.yf.address.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsjy.yf.address.entity.dataobject.VillageDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author whj
 * @version 1.0
 * @date 2021-01-15 9:43
 */
public interface VillageMapper extends BaseMapper<VillageDO> {
    /**
     * 查找所有自然村、组名
     *
     * @return
     */
    List<String> searchVillageNameAll();

    /**
     * 根据区划代码查找自然村数据
     *
     * @param parentCode
     * @return
     */
    List<VillageDO> searchVillageWithParentCode(Integer parentCode, Boolean flag);

    /**
     * 增加自然村
     *
     * @param villageDO
     * @return
     */
    Integer addVillage(@Param("villageDO") VillageDO villageDO);


    /**
     * 更新修改
     *
     * @param villageDO
     * @return
     */
    Integer updVillage(@Param("villageDO") VillageDO villageDO);
}
